- Set your terminal to metafont: set terminal mf - Select an output-file, e.g.: set output "myfigures.mf" - Do your plots. Each plot will generate a separate character. Its default size will be 5*3 inches. You can change the size by saying set size 0.5,0.5 or whatever fraction of the default size you want to have. - Quit gnuplot. - Generate a tfm- and gf-file by running metafont on the output of gnuplot. Since the plot is quite large (5*3 in), you will have to use a version of metafont that has a value of at least 150000 for memmax. On Unix-systems these are conventionally installed under the name bigmf. For the following assume that the command virmf stands for a big version of metafont. For example: - Invoke metafont: virmf '&plain' - Select the output device: At the metafont prompt ('*') type: \mode:=CanonCX; % or whatever printer you use - Optionally select a magnification: mag:=1; % or whatever you wish - Input the gnuplot-file: input myfigures.mf On a typical Unix machine there will usually be a script called mf that executes virmf '&plain', so you probably can substitute mf for virmf &plain. This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates the resolution of your device). The above can be conveniently achieved by typing everything on the command line, e.g.: virmf '&plain' '\mode:=CanonCX; mag:=1; input myfigures.mf' In this case the output files will be named myfigures.tfm and myfigures.300gf. - Generate a pk-file from the gf-file using gftopk: gftopk myfigures.300gf myfigures.300pk The name of the output-file for gftopk depends on the dvi-driver you use. Ask your local TeX-administrator about the naming conventions. Next, either install the tfm- and pk-files in the appropriate directories, or set your environment-variables properly. Usually this involves setting TEXFONTS to include the current directory and do the same thing for the environment-variable that your dvi-driver uses (no standard name here...). This step is necessary so that TeX will find the font-metric file and your dvi-driver will find the pk-file. - To include your plots in your document you have to tell TeX the font: \font\gnufigs=myfigures Each plot you made is stored in a single character. The first plot is character 0, the second is character 1, and so on... After doing the above step you can use the plots just like any other characters. Therefore, to place plots 1 and 2 centered in your document, all you have to do is: \centerline{\gnufigs\char0} \centerline{\gnufigs\char1} in plain TeX. For LaTeX you can, of course, use the picture environment and place the plot according to your wishes using the \makebox and \put macros. It saves you a lot of time, once you have generated the font, since TeX handles the plots as characters and uses minimal time to place them. Also the documents you make change more often, than the plots do. Also it saves a lot of TeX-memory. One last advantage of using the metafont-driver is that the dvi-file really remains device independent, because no \special-commands are used as in the eepic- and tpic-drivers.


converted with guide2html by Kochtopf